﻿using LiteFramework.Contract;
using LiteFramework.Server;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Website.Sys
{
    public partial class Role : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //using (new ApproleScope())
                //{
                //    var datas = ServerApplication.ComponentFactory.Create<IRoleContract>().GetAll();
                //    //this.repeater1.DataSource = users;
                //    //this.repeater1.DataBind();
                //    if (datas == null)
                //        this.JsonData = "[]";
                //    else
                //        this.JsonData = "[" + string.Join(",", datas.Select(i => string.Format("{{ id: \"{0}\", name: \"{1}\", timecreated: \"{2:yyyy-MM-dd}\", description: \"{3}\" }}", i.Id, i.Name, i.TimeCreated, i.Description))) + "]";
                //}
            }
        }

        public string JsonData { get; private set; }
    }
}